package com.ruin.tech.ahri.service;

import com.ruin.tech.ahri.model.dto.Article;
import com.ruin.tech.ahri.model.dto.ArticleDTO;
import com.ruin.tech.ahri.model.dto.ArticlePageDTO;
import com.ruin.tech.ahri.model.vo.ArticleVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface IArticleService {
    
    /**
    * @description: 保存或更新文章
    * @param: [article]
    * @return: void
    * @author: ruin
    * @date: 2019/12/4
    */
    void saveArticle(Article article, MultipartFile coverImg) throws Exception;
    
    
    /**
    * @description: 根据文章对象内容分页查询相应文章列表
    * @param: [articlePageDTO]
    * @return: java.util.List<com.ruin.tech.ahri.model.dto.Article>
    * @author: ruin
    * @date: 2019/12/11
    */
    List<Article> findArticlePage(ArticlePageDTO articlePageDTO) throws Exception;

    /**
    * @description: 根据文章id和当前登陆用户查询相应的信息
    * @param: [param]
    * @return: com.ruin.tech.ahri.model.dto.Article
    * @author: ruin
    * @date: 2019/12/11
    */
    ArticleVO findArticleById(ArticleDTO param) throws Exception;
    
    /**
    * @description: 增加浏览记录
    * @param: [param]
    * @return: void
    * @author: ruin
    * @date: 2019/12/24
    */
    void addArcticleReadCount(ArticleDTO param) throws Exception;

    /**
     * @description: 获取浏览记录
     * @param: [param]
     * @return: void
     * @author: ruin
     * @date: 2019/12/24
     */
    List<Article> mylook(ArticlePageDTO param) throws Exception;

    /**
     * @description: 获取收藏列表
     * @param: [param]
     * @return: void
     * @author: ruin
     * @date: 2019/12/24
     */
    List<Article> mylike(ArticlePageDTO param) throws Exception;
}
